package com.guigu.www.cxk.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.www.cxk.service.CXKMindTestService;
import com.guigu.www.mapper.ConstitutionTestMapper;
import com.guigu.www.mapper.MindTestMapper;
import com.guigu.www.mapper.RiskTestMapper;
import com.guigu.www.pojo.ConstitutionTest;
import com.guigu.www.pojo.MindTest;
import com.guigu.www.pojo.RiskTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CXKMindTestServiceImpl implements CXKMindTestService {
    @Autowired
    ConstitutionTestMapper constitutionTestMapper;

    @Autowired
    MindTestMapper mindTestMapper;

    @Autowired
    RiskTestMapper riskTestMapper;

    @Override
    public ConstitutionTest selectCon(int sid) {
        QueryWrapper<ConstitutionTest> wrapper = new QueryWrapper<>();
        wrapper.eq("mem_id",sid);
        return constitutionTestMapper.selectOne(wrapper);
    }

    @Override
    public MindTest selectMind(int sid) {
        QueryWrapper<MindTest> wrapper = new QueryWrapper<>();
        wrapper.eq("mem_id",sid);
        return mindTestMapper.selectMind(sid);
    }

    @Override
    public RiskTest selectRisk(int sid) {
        QueryWrapper<RiskTest> wrapper = new QueryWrapper<>();
        wrapper.eq("mem_id",sid);
        return riskTestMapper.selectOne(wrapper);
    }
}
